<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>石功夫编辑器 EDITOR v1.0</title>
    <link rel="stylesheet" href="bootstrap.min.css">
    <link rel="stylesheet" href="font-awesome/css/font-awesome.css">
    <!-- <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> -->
   <link rel="stylesheet" href="style.css">
</head>

<body style="background:#f2eee5;margin:0;padding:0; ">

  <!--div id="controls_pannel" style="z-index:2;margin:0;padding:0;width:100vw;height:0vh;position:absolute1;top:0;left:0;right:0;bottom:0"></div-->
  
  <svg id="lin" viewBox="0 0 1100 700"  preserveAspectRatio="xMidYMin slice" xmlns="http://www.w3.org/2000/svg" style="z-index:2;margin:0;padding:0;width:100vw;height:100vh;position:absolute1;top:0;left:0;right:0;bottom:0"-->
 
      <pattern id="smallGrid" width="100" height="100" patternUnits="userSpaceOnUse">
        <path d="M 100 0 L 0 0 0 100" fill="none" stroke="#777" stroke-width="0.25"/>
      </pattern>
      <pattern id="grid" width="300" height="300" patternUnits="userSpaceOnUse">
        <rect width="300" height="300" fill="url(#smallGrid)"/>
        <path d="M 200 10 L 200 0 L 190 0 M 0 10 L 0 0 L 10 0 M 0 190 L 0 200 L 10 200 M 190 200 L 200 200 L 200 190" fill="none" stroke="#999" stroke-width="0.8"/>
      </pattern>
      <pattern id="hatch" width="5" height="5" patternTransform="rotate(50 0 0)" patternUnits="userSpaceOnUse" >
        <path d="M 0 0 L 0 5 M 10 0 L 10 10 Z" style="stroke:#666;stroke-width:5;" />
      </pattern>
    </defs>
    <g id="boxgrid">
      <rect width="8000" height="5000" x="-3500" y="-2000" fill="url(#grid)" />
    </g>
   
    <g id="boxSurface" class="hhl"></g>
    <g id="boxBase" class="hhl"></g>
	<g id="boxBase2" class="hhl"></g>
    <g id="boxwall" class="hhl"></g>
    <g id="boxcarpentry" class="hhl"></g>
    <g id="boxEnergy" class="hhl"></g>
    <g id="boxFurniture" class="hhl"></g>
    <g id="boxbind" class="hhl"></g>
    <g id="boxArea" class="hhl"></g>
    <g id="boxRib" class="hhl"></g>
    <g id="boxScale" class="hhl"></g>
    <g id="boxText" class="hhl"></g>
    <g id="boxDebug" class="hhl"></g>
	 <g id="boxpath" class="hhl"></g>
	 <g id="movingzone"  ></g>
	 <g id="box_editline" class="hhl"></g>
	 <g id="box_editcircle" class="hhl"></g>
	
  </svg>
  <div id="zoomBox" style="position:absolute;z-index:100;right:50px;bottom:20px;text-align:center;background:transparent;padding:0px;color:#fff;transition-duration: 0.2s;transition-timing-function: ease-in;">
    <div class="pull-right" style="margin-right:10px">
      <button class="btn btn btn-default zoom" data-zoom="zoomin" style="box-shadow:2px 2px 3px #ccc;"><i class="fa fa-plus" aria-hidden="true"></i></button>
      <button class="btn btn btn-default zoom" data-zoom="zoomout" style="box-shadow:2px 2px 3px #ccc;"><i class="fa fa-minus" aria-hidden="true"></i></button>
    </div>
    <div style="clear:both"></div>
      <div id="scaleVal"  class="pull-right"  style="box-shadow:2px 2px 3px #ccc;width:100px;height:20px;background:#4b79aa;border-radius:4px;margin-right:10px">
        250mm
      </div>

      <div style="clear:both"></div>
  </div>
  
  
  
  <div id="panel" class="leftBox" style="transform: translateX(200px); display: block;">
      <ul class="list-unstyled">
         
        <li><button class="btn btn-default fully" id="selectModel">选择模板</button></li><br>	
		<li><button class="btn btn-default fully modelbtn"  model="circle_addNode">增加顶点</button></li>
        <li><button class="btn btn-default fully modelbtn" model="circle_deleteNode">删除顶点</button></li>
        <li><button class="btn btn-default fully modelbtn" model="circle_addCuttingNode">增加切割线</button></li>
		<li><button class="btn btn-default fully modelbtn" model="circle_deleteCuttingNode">删除切割线</button></li>
		<li><button class="btn btn-default fully " id="export_plan">导出方案</button></li>
        <br>
        <div id="hole_list" class="list-unstyled sub" style="box-shadow: rgb(204, 204, 204) 2px 2px 3px; background: rgb(255, 255, 255); border-radius: 0px 5px 5px 0px; padding: 10px; position: absolute; left: 200px; width: 150px; display: none;">
          <button class="btn fully hole" onclick="addObject('rectangle')">矩形</button>
          <button class="btn fully hole"  onclick="addObject('ellipse')" >(椭)圆形</button>
        
        </div>
        <li><button class="btn fully btn-default" id="door_mode" onclick="$('.sub').hide();$('#hole_list').toggle(200);">挖孔</button></li>

      </div>
       <br>

      <li><button class="btn btn-default fully " id="layer_mode" onclick="$('.sub').hide();$('#layer_list').toggle(200);">Layers</button></li>

    
     <li>

      <div style="clear:both"></div>
    </li></ul>
  </div>
  <div class="modal fade col-xs-9 col-md-12" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="myModalLabel">请选择模板</h4>
        </div>
        <div class="modal-body">
          
          <div class="row">
             <div class="col-md-3 col-xs-3 boxMouseOver"  style="min-height:140px;margin:15px;background:url('newPlanEmpty.jpg')"><img src="newPlanSquare.jpg"  class="img-responsive" style="margin-top:10px" onclick="load(initPlan['plan_1']());$('#myModal').modal('toggle')"/></div>
            <div class="col-md-3 col-xs-3 boxMouseOver"  style="min-height:140px;margin:15px;background:url('newPlanEmpty.jpg')"><img src="newPlanL.jpg"  class="img-responsive" style="margin-top:20px" onclick="load(initPlan['plan_2']());$('#myModal').modal('toggle')"/></div>
          </div>
        </div>
        <!-- <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">CLOSE</button>
          <button type="button" class="btn btn-primary">YES</button>
        </div> -->
      </div>
    </div>
  </div>
  <div class="modal fade col-xs-9 col-md-12" id="myModal_editVertex" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="myModalLabel">编辑角</h4>
        </div>
        <div class="modal-body">
          
          <div class="row form-group">
		  <label class="col-sm-5 control-label"> 	内角度数： </label>
 			 <div class="col-sm-7">
 					 <input name="a" class="form-control m-b hhl_input">
 			 </div>
		  	<label class="col-sm-5 control-label"> 	圆角半径： </label>
 			 <div class="col-sm-7">
 					 <input name="r" class="form-control m-b hhl_input">
 			 </div>
			 
          </div>
		  
		  <button type="button" class="btn btn-info btn-block btn-lg "  onclick="save_editVertex();" >
 					&nbsp;保存
 		  </button>
        </div>
        <!-- <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">CLOSE</button>
          <button type="button" class="btn btn-primary">YES</button>
        </div> -->
      </div>
    </div>
  </div>
  
  
  <div class="modal fade col-xs-9 col-md-12" id="myModal_editLine" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="myModalLabel">编辑边</h4>
        </div>
        <div class="modal-body">
          
          <div class="row form-group">
		  	<label class="col-sm-5 control-label"> 	长度： </label>
 			 <div class="col-sm-7">
 					 <input name="l" class="form-control m-b hhl_input">
 			 </div>
          </div>
		  
		  <button type="button" class="btn btn-info btn-block btn-lg "  onclick="save_editLine();" >
 					&nbsp;保存
 		  </button>
        </div>
        <!-- <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">CLOSE</button>
          <button type="button" class="btn btn-primary">YES</button>
        </div> -->
      </div>
    </div>
  </div>
    <script src="qSVG.js"></script>
  <script src="jquery.min.js"></script>
  <script src="bootstrap.min.js"></script>
  <script src="func1.js"></script>
  <script src="base.js"></script>
</body>

</html>
